
<% form_tag "", :name => :searchform, :onsubmit => "query_changed();return false;" do -%>
  <% unless @category %>
    <%= hidden_field_tag "search_category_form" %>
  <% else %>
    <%= hidden_field_tag "search_category_form", @category.to_param %>
  <% end %>
  <table>
    <tr>
      <td>
        <%= render :partial => "/search/search_field" %>
      </td>
      <td>
        <%= render :partial => "/search/select_province" %>
      </td>
      <td>
        <div id="search_province_counties">
          <% @provinces.each do |p| %>
            <%= render :partial => "/search/select_county", :locals => { :province => p } %>
          <% end %>
        </div>
      </td>
    </tr>
  </table>
<% end %>

<script language="javascript">
<!--
<% if @province %>
        $('search_province_<%=@province.to_param%>_county').show();
        $('search_province_form').value = '<%=  @province.to_param %>';
<% else %>
        $('search_province_form').value = '';
<% end %>
//-->
</script>